package Day10;

import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改
/**
 * 2021Java真题:最少砝码
 * https://www.lanqiao.cn/problems/1461/learning/
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int n = scan.nextInt();
        int sum = 0;
        for(int i = 1; i > 0; i++){
          sum = sum * 3 + 1;
          if(sum >= n){
            System.out.println(i);
            break;
          }
        }
        scan.close();
    }
}